package org.jwebuilder;

import javax.servlet.ServletContext;

import org.jwebuilder.parsers.TemplateParser;
import org.jwebuilder.parsers.XmlPageParser;

import com.google.inject.Binder;
import com.google.inject.Module;
import com.google.inject.name.Names;

public class GuiceModule implements Module
{
	public void configure(Binder binder)
	{
		//binder.bindConstant().annotatedWith(Names.named("TemplateEncoding")).to(JWebuilderFilter.TemplateEncoding);
		binder.bind(TemplateParser.class).to(XmlPageParser.class);
		binder.bind(ServletContext.class).toInstance(JWebuilderFilter.Application);
		binder.bindConstant().annotatedWith(Names.named("EnableTemplateCache")).to(JWebuilderFilter.EnableTemplateCache);
	}
}